package io.itit.ecp.admin.provide.action.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.itit.grass.common.provide.action.validation.IAdd;
import io.itit.grass.common.provide.action.validation.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * @Author：Roy
 * @Description：碳汇数据参数
 * @Date：Create by 2023-12-01 10:45:08
 */
@Data
@ToString
@ApiModel("碳汇数据参数")
public class CarbonSinkDataReq implements Serializable {

    private static final long serialVersionUID = 1L;

    @Null(groups = IAdd.class)
    @NotBlank(groups = IUpdate.class)
    @ApiModelProperty("主键")
    private String id;

    @NotNull(groups = {IAdd.class, IUpdate.class})
    @ApiModelProperty("数据时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai")
    private Date solidifyDate;

    @NotBlank(groups = {IAdd.class, IUpdate.class})
    @ApiModelProperty("项目Id")
    private String sceneProjectId;

    @ApiModelProperty("项目名称")
    private String projectName;

    @ApiModelProperty("楼栋Id")
    private String sceneEdificeId;

    /* 楼层Id */
    @ApiModelProperty("楼层Id")
    private String sceneFloorId;

    /* 空间Id */
    @ApiModelProperty("空间Id")
    private String sceneRoomId;

    /* 碳汇因子Id */
    @ApiModelProperty("碳汇因子Id")
    private String carbonSinkId;

    @NotBlank(groups = {IAdd.class, IUpdate.class})
    @ApiModelProperty("植被类型(1:休闲绿地,2:道路绿地,3:居住区绿地,4:单位附属绿地) >> distCode：ecp-admin.carbonSinkData.type")
    private String type;

    @NotNull(groups = {IAdd.class, IUpdate.class})
    @ApiModelProperty("面积(㎡)")
    private BigDecimal area;

    @ApiModelProperty("减碳量(kgCO2)")
    private BigDecimal carbonEmission;

    @ApiModelProperty("减碳量(计算过程)")
    private String carbonEmissionProcess;

}